<template>
  <div
    class="com-global-empty w-flex-center"
    v-if="isShow">
    <empty-icon class="icon"/>
  </div>
</template>

<script>
  import EmptyIcon from '@/icons/empty.svg'
  export default {
    name: "ComGlobalEmpty",
    components: {
      EmptyIcon
    },
    data() {
      return {
        isShow: false
      }
    },
    methods: {
      show(show) {
        if (show instanceof Array) {
          this.isShow = !show.length
        } else {
          this.isShow = show
        }
      }
    }
  }
</script>

<style lang="scss" scoped>
.com-global-empty {
  height: 400px;
  .icon {
    width: 200px;
    height: 200px;
    fill: #eee;
  }
}
</style>
